Skip to content

Implement persistent World Graph MVP with Supabase vectors, edges, and Guardian safety output#74

Draft
frankxai with Copilot wants to merge 2 commits into
mainfrom
copilot/implement-world-graph-mvp
Draft

Implement persistent World Graph MVP with Supabase vectors, edges, and Guardian safety output#74
frankxai with Copilot wants to merge 2 commits into
mainfrom
copilot/implement-world-graph-mvp

Conversation

Copilot AI commented Jun 17, 2026

Copy link
Copy Markdown

Summary

This PR delivers the Phase 1 World Graph MVP by persisting lore/character/location graph state, storing vectorized node data, and adding relationship edge persistence. It also wires SIS memory sync visibility and returns Guardian safety status in world graph responses.

Changes

  • Graph persistence + SIS sync

    • Persist world graph snapshots to ~/.arcanea/sis-world-graphs.json.
    • Load snapshots on access and sync after node/edge mutations.
    • Expose SIS sync metadata in get_world_graph.
  • Supabase-backed world graph storage

    • Added migration for world_graph_nodes and world_graph_edges with constraints and indexes.
    • Added match_world_graph_nodes(...) for embedding similarity retrieval.
    • Added best-effort MCP persistence to Supabase REST for nodes/edges when service-role env vars are present.
  • Vector embeddings for graph nodes

    • Added deterministic 64-d embedding generation for node semantic representation.
    • Persist embeddings with node records and include supporting metadata.
  • Guardian safety check

    • Added runGuardianSafetyCheck(sessionId) to flag unsafe graph states (invalid gate values, self-links, high-adversarial edges).
    • Included guardianSafety in get_world_graph output.
  • Targeted MCP test coverage

    • Added tests for deterministic embedding shape/content, safe graph report, and SIS sync file creation.
const summary = getGraphSummary(sessionId);
const safety = runGuardianSafetyCheck(sessionId);

return {
  worldSummary: summary,
  guardianSafety: safety,
  sisSync: { status: "synced", storagePath: getSisWorldGraphFilePath() },
};

Type

  • Feature (new functionality)
  • Fix (bug fix)
  • Refactor (code improvement, no behavior change)
  • Docs (documentation only)
  • Lore (universe content, Library texts)

Checklist

  • TypeScript compiles with zero errors (pnpm build)
  • Changes align with ARCANEA_CANON.md (if lore-related)
  • No new any types introduced
  • Tested locally or verified in Vercel preview
Original prompt

Phase 1 Deliverable: Implement persistent World Graph MVP using Supabase + vector embeddings + edge relationships for lore/characters/locations. Ensure SIS memory sync. High quality, with tests and Guardian safety check. Make it beautiful and Arcanea-native.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arcanea-2 Error Error Jun 17, 2026 1:47am
arcanea-web Ready Ready Preview, Comment, Open in v0 Jun 17, 2026 1:47am

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Invalid vercel.json file provided

Copilot AI changed the title [WIP] Implement persistent World Graph MVP with Supabase Implement persistent World Graph MVP with Supabase vectors, edges, and Guardian safety output Jun 17, 2026
Copilot AI requested a review from frankxai June 17, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants